﻿#pragma once
#include <vector>
#include <functional>

class LayerManager {
public:
    enum Layer { BACKGROUND, OBJECT, UI };

    void add_draw_call(Layer layer, std::function<void()> draw_func) {
        layers[layer].push_back(draw_func);
    }

    void render_all() {
        for (auto& layer : { BACKGROUND, OBJECT, UI }) {
            for (auto& func : layers[layer]) {
                func();
            }
        }
    }

private:
    std::vector<std::function<void()>> layers[3]; 
};
